Your lawyer is correct. But it can only protect the loan, not the whole house.
Also if the loan agreement was signed only by you, and the house is under joint name of you and your wife, it will be more complicated. It might be treated as your personal liability.