You should calculate the clusterFilter outside the file loop.