class TemplateProcessor {

    public Writer createFileWriter(String fileToWrite) {
        try {
            Files.deleteIfExists(Paths.get(fileToWrite));
            return new FileWriter(new File(fileToWrite), true);
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }

}