Added log calls to API