rename file and update contents