throw exception if shell commands fail