Fix missing File.write issues