public static boolean writeTextFile(Path file, List<String> lines, boolean append) {
        if ((file == null) || Files.isDirectory(file, LinkOption.NOFOLLOW_LINKS)) {
            return false;
        }

        return FileWriter.writeFile(file, lines, append);
    }