improve error handling and reporting on failed commands
respond to code review
Merge pull request #496 from gilmoskowitz/runCmd

improve error handling and reporting on failed commands