use logging, improve documentation
allow mask to be "None"
accumulate length of path as well
minor output format changes