Write errors directly to a stream