Upon the return of any order of sale the Superior Court shall, if real estate is sold, inquire into the circumstances and regularity of the proceedings relative to such sale and either confirm the sale or set it aside. If the Superior Court confirms the sale the sheriff shall deliver to the purchaser a certificate reciting the judgment recovered in the proceedings and the order of sale and setting forth the facts relative to such sale, and the purchaser shall have and be possessed of all rights in and to the real estate, subject to the right of redemption as provided in § 8758 of this title, as the defendant in the proceeding had on July 1 of the year for which the taxes were levied upon, which judgment was recovered in the proceeding, and the Superior Court shall have power to make all necessary orders and rules and to issue all writs which may be necessary to put the purchaser in possession of the real estate without delay. If the sale be set aside another order of sale may issue and be executed in the same manner and with like effect. Upon confirmation of such sale, the sheriff shall pay to the plaintiff the amount of the judgment with interest and costs and shall pay the balance thereof to such persons who were served with notice of such sale as then hold liens upon the lands and premises whether by way of taxes, mortgage, judgment, recognizance or otherwise, in accordance with the priority of their lien and the balance thereof shall be paid to the person who was the owner of the real estate at and immediately before the sale, or the sheriff may, after paying to the plaintiff the amount of the judgment with interest and costs, pay the balance thereof into the Superior Court. No sale shall be confirmed if the owner of the real estate or any person having an interest therein shall pay to the plaintiff or shall pay into the Superior Court for the use of the plaintiff the amount of the judgment together with interest and all costs.