Simplify logging in API
Improve logging