Changed the name of the methods, writeToLog and writeLineToLog to
more generic writeToFile and writeLineToFile