How long does it take for a debt to be legally written off