set error handler

we can't see the error from TextAid
definitely close the edited file before deleting.

ByteString.Lazy.readFile doesn't seem to close the file until finishing to read, which prevents from deleting the edited file on Windows.