Using appendFile method for writeLog