Update failure_analysis.py to extract info directly from MongoDB