Speed up exists function on buckets with large number of files (>10⁵)