ported 'stream' and 'error'