Add debug
Improve logging