working on network errors in stream