added StreamError struct