handle multiple types of stream end events and use real node streams instead of through2