Solving possible race condition issues with certain datasets
In some legacy datasets, the same sample can work as a biometric reference and probe. Running distributed experiments might trigger some racing conditions. Since our file system has no file locking mechanism, we might face some random and bizarre bugs. This MR fixes the issue.