Added error check for existing counters