Added API logging