Tried to write an exception to a file