Better checking of stats call. Check for duplicate names before saving.