change write new file to append