If the owner makes default at the time appointed, or if, upon a hearing of the parties, it appears 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 that purpose, and the property may be sold in conformity with the order. The court shall ascertain the amount due up to the time of the entering of the order, and any surplus of the proceeds of the sale, after satisfying the debt and all costs and charges, shall be paid into the registry of the court for the benefit of the lawful owner of the property.
R.I. Gen. Laws § 34-35-5