Add a test checking for errors in execute() mode
Better error handling in stream mode (#5)