write files with new data