added logger on -d option
debug output to debug logger