Question: Saveplot function not refresh in for loop call

I search saveplot and sleep function here

i had kept close filename function and move plot setup default to first line

but thread no sleep in maple 12

then I remove sleep and can save image file

but after I call it in a function and run a for loop for this function

the file is not updated after sleep 3 seconds 

how to run a for loop call it and it can refresh 

Please Wait...