Updating and renaming document