better error handling and logging for data extraction from articles