Exception when resource name duplicates

Throws a more meaningful exception when resource name duplicates