Added error handling and logging for SNMP failures