Don't print when nothing happens
Fix unused variable warning
Improve debug output