added back warn on error and warn on duplicate