apply sort and uniq to flagFiles to make sure the entries are unique