Enhance OCR Precision with Smart Exception Handling