Added functionality for better error analysis (error classification)