debugging of ouput from run_cmd