Insurance pay-outs

Hypothetical example: a property lender has a mortgage on and holds 1st lien position were to be destroyed, when a claim is made, who would get the funds from the insurance company? What kind of protection do our loan docs have?

 In section D.2 (f) of the loan agreement (screenshot below) you will see that in the event of loss, the borrower must notify the lender immediately in writing.  In that situation Lender is appointed as attorney-in-fact to "collect and receive proceeds of the property damage insurance".