Fixed stream error logging