Banks write off loans