updated to track subdirectory ambiguity