Rename a file.
Remove the old hooks and events.