public static void writeFile(File file, String text, boolean append) throws IOException {
       BufferedWriter out = null;
       try {
           out = createWriter(file, append);
           out.write(text);
       }
       finally {
           closeWriter(out);
       }
    }
Writes the given string to the file
vespajlib/src/main/java/com/yahoo/io/IOUtils.java