Add logging to debug api integration