Automating LOC write-off