If, after the recording of the mortgage, any writ of attachment attaching the real estate mortgaged under the mortgage or any execution against the real estate or any notice of lis pendens affecting the real estate is recorded in the records of the city or town, loans on the security of the mortgage, made after the attachment, execution or lis pendens becomes so of record, shall not have priority over the attachment, execution or notice of lis pendens, except that loans which the mortgagee at or before the recording of the mortgage made or agreed with the mortgagor to make on the security of the mortgage and additional loans made on the security of the mortgage pursuant to the provisions of §§ 34-25-1 - 34-25-5 prior to such recording of the attachment, execution or lis pendens, together with interest thereon, and the taxes, insurance premiums and obligations of the mortgagor as the mortgagee has agreed, or which the mortgagor has given the mortgagee the right, to pay in connection with the mortgage, shall continue to have priority over the attachment, execution or lis pendens.
R.I. Gen. Laws § 34-25-3