factor out simple stream dump()