Add --whitelist flag and internal logic