Improve logging and add verbose mode