renaming files and delete unnecessary work