Add end() to stream error handler.