add debug output (path count) last commit has wrong code.