The old code wasn't closing the stream. I can try closing it. That does seem more correct.