just make sure all streams get closed