correct output stream for error messages