new function,appendFile()