Ensure we dont block on closing streams