update write file