// Print the warning only once as the number goes past 20
if(n==20){
LOGWARN(3,"Performance warning: there are "<<n<<" instances of "<<name<<" running in the background. This shouldn't be normally happening - check logs for other warnings and errors.");