close channel when we see an exception