closing streams on tests