Modified the logic to check the resource files for duplicate keys prior to processing them to avoid any errors downstream