fix DXCommandmode::run_cmd to detect errors earlier