Added extra error handling to skip metrics that are problematic