All moneys recovered in any such action shall be paid or appropriated for the use contemplated or directed by law.