tweaks to error reporting