try caching outputstream