modifying xlReg error handling