public static BufferedWriter createWriter(String filename, boolean append) throws IOException {
        createDirectory(filename);
        return new BufferedWriter(new FileWriter(filename, append));
    }
Creates a buffered writer in the default encoding

@param filename the name or path of the file
@param append whether to append to the files if it exists
vespajlib/src/main/java/com/yahoo/io/IOUtils.java