Add checking for duplicates in each file
Switch from boolean parameter to enum