Adding API key check