modify write file