what happens when a loan is written off