Added error detection for exect() that fires OCR command, and logging of output.