Fix race condition in test for *FileID functions