create a new file or overwrite it with the string
/**
* create a new file or overwrite it with the string
* @param path make sure path escapes the slashes "\\"
* @param content
* @throws IOException
*/
private void overwriteFile(String path, String content) throws IOException {
File file = new File(path);
FileWriter bw = new FileWriter(file);
bw.write(content);
bw.close();
}