I am trying to append a string to a log file. However writeFile will erase the content each time before writing the string.
fs.writeFile(\'log.txt\'
Using jfile package :
myFile.text+='\nThis is new line to be appended'; //myFile=new JFile(path);