push `except` part upward, it only makes sense for the `os.mkdir`, call `run_cmd` outside of `try`-`except`