Section 41. The court may award costs to either party, but the creditor or purchaser shall not be required to pay costs, unless it appears that he has unreasonably neglected to render, when requested, a just and true account of the amount due on the judgment, of the money expended in repairing and improving the land and of the rents and profits thereof; or unless it appears that a sufficient amount was tendered to him for the redemption of the land, and that he neglected for seven days thereafter to execute and deliver a release thereof as before required. If the creditor or purchaser has, before the commencement of the action, tendered such a deed of release and alleges such tender and brings the deed into court to be delivered to the debtor, he shall recover costs.