better error messages for extractor

Previously extractor would just crash because of unhandled exceptions.
Now it displays meaningful error messages.