When sold, the proceeds of the lumber shall be applied first to the payment of the charges of sale and in liquidation of the expenses and damages awarded to the claimant. The residue shall be paid to the county treasurer, to be by him paid over to the former owner of the lumber, or his representatives, or assigns, on the production of proof of his former ownership satisfactory to the judge of the superior court of the county, and on his order therefor, made within one year after its receipt.