This message could be a bit more informative, ie what was the command that failed, or is that already contained in the err str? If not could you add the command to error message as well. Apart from that, looks good, ready to merge. Cheers.