fixed error checking with SNMP usage