again rewrote error reporting routines