Add try...catch to protected os.chdir won't failed.