Fixed unclosed stream