Fix #302 issue,stop shell stream on error