Updated run_cmd functions