added option to disable check for new version
a bit of cleanup on debug logging