Improve stream example: callback can be called with an error

Since the documentation is sparse, detailed examples are important.