commit the handler when putting on a closed channel
keep track of the original generator function for debugging
error handling