Avoid erroneous warning when encountering an error while flushing.