support hashify root aka KeepRoot
improved path matching