modify write files to 'w' instead of 'wa'