Avoid reading entire file when finding samples to exclude