Using streams for error reporting