Slight optimization to runProcess/Shell on error