capture the os.rename exception