make sure to sync the index before testing file