Delete error files in case of exceptions caused by flushing, unless there was a network exception