Rename files and delete abandoned files