The indebtedness remaining in default, the sale will be made for the purpose of applying proceeds thereof to the payment of the indebtedness secured by the deeds to secure debt, accrued interest and expenses of the sale and other sums secured by the deed to secure debt and the remainder if any shall be applied as permitted by law.