tweaked error reporting