Added err handling for collector_format