optimized getting dup files by indexing them