add a callback to fromStream() to execute when the output channel gets closed