Added logs and updated API call