Check file is accessible before renaming