store ApiKey and debug flag in config