added missing error handling and removed CAPS_CONSTS
added missing error handling and removed CAPS_CONSTS

rgooch/keymaster,rgooch/keymaster,Symantec/keymaster,rgooch/keymaster,Symantec/keymaster,Symantec/keymaster