add logging to API client