resolve #270: catch shell errors

@kevgo
I don't get how you determine whether there was an error with this.