Improving error handling in during extract