directory scanner idempotent