remove debug code
refactor
improve to start traverse from last directory