Section 29. If, upon a default or a trial it is found that a lien exists upon the property and that the property ought to be sold for the satisfaction of the debt, the court may make an order for such sale, determine and record the amount then due and award costs to the prevailing party. Any proceeds of the sale remaining after satisfying the debt, costs and charges, shall be paid to the owner upon demand.