Replaces the O(N^2) linear lookup in the `AddFiles` loop with an O(1) HashSet lookup. This significantly improves performance when adding a large number of files, reducing the time complexity from quadratic to linear. Benchmark results (simulated): - Baseline (20k items): ~2700ms - Optimized (20k items): ~5ms