public static boolean writeTextFile(String fileName, String content) {
        try {
            File f = new File(fileName);
            if (f.exists() && !f.isDirectory() && f.canWrite()) {

                FileWriter fw = new FileWriter(fileName);
                BufferedWriter bw = new BufferedWriter(fw);
                bw.write(content);
                bw.close();

                return true;
            }
        } catch (Exception e) {
            WebServer.triggerInternalError("Error Writing to File: " + fileName + " error: " + e.getMessage());
        }
        return false;
    }