Write the file
static Future<File> writeFile(File file, String content) => file.writeAsString(content, flush: true);