try e catch on ocr