add exception handler for error parsing