this should be in `finally` just in case the commands before throw an exception