whitelistRecord, add test, add better error handling for methods and callers