resolve #270: catch shell errors

@kevgo
Okay, good as is then.