In case the defendant shall not appear at the return term of the writ, or in cases against unknown owners, where no person or party interposes a claim, the court shall award the petitioner a judgment for the amount as appears to the court that petitioner is entitled to, and condemn the funds in the hands of the sheriff, or render judgment against the defendant or his bond as the case may be, for the satisfaction of the judgment so rendered and costs. In case there shall be a surplus remaining in the hands of the sheriff after satisfying the judgment and costs, it shall be paid to the clerk of the court, to be held by him subject to the claim of the owners of the property so sold, and shall be paid out to such owner, upon the order of the court, after satisfactory evidence is adduced, establishing in the judgment of the court such ownership. In all cases where the petitioner establishes his claim, and is awarded a judgment for the amount stated in the petition, the court shall allow the petitioner a reasonable attorney’s fee for preparing the petition, which shall be taxed as part of the costs of the case.