Handle errors from pipe