in fromStream(), close output channel within a go block