Improve APi logging