test the file exists, test there are no duplicates