avoid closing stream