Avoid file creation\opening race in file writer.