error reporting cleanup