error reporting of run_commands improved