Improve command execution handling

We'll now give useful debug output if commands fail.