Adding logger for invalid API key and network issues
Removing unused import
fix small typo