Added logging for API fetch