fixed error handler (don't let error output get added to output buf)