rename files; error check