deletes garbage after renaming