Added logging for API