added debug log to figureout categorize errors