rename the file and updated the file