modify a file and create new file