 But we look upon these provisions as merely intended to enforce prompt payment and as incidental regulations appropriate to the subject.The law which authorized these coercive measures gave to mortgagees and judgment creditors the right to pay the rents and to have the benefit of the lien thereof, so that it was in their own power to protect themselves from any such penalties and accumulations of interest.They are analogous to the costs incurred in the foreclosure of the first mortgage, which have the same priority as the mortgage itself over subsequent encumbrances.