add error checking to loading whitelist