The money recovered in such action shall be applied under direction of the court, to complete the deficient records. If more than sufficient, the balance inures to the State. If not sufficient, the balance may be recovered by the Treasurer of State in an action founded on the bond and facts.