add -fail-on-dup flag