Plot function does't work in a loop

I need to generate the train data used by the mechine learning, When I use random() function to build the vary domain, the output of the plot function does’t work, edp code is list as follow:
int index =0;
int NCount=10;
for(int i=0;i<NCount;++i)
{
index++;
real cx= randreal3();
real cy= randreal3();
real radius = randreal3();
if(radius <0.2) continue;
cout <<“Round 1->”<<“cx:”<<cx<<“cy:”<<cy<<“radius:”<<radius<<endl;
border Circle(t=0,2pi) { x = cx+radiuscos(t); y=cy+radius*sin(t); label=1;}
plot(Circle(20),ps= “test” + index + “.eps”);
}
It’s always the same eps image from the second. I don’t know why, many thanks for help!