Add debug option and API debug output
Add API key caching to reduce traffic