Do not have all of the IMAQ VIs so I can't test it all but here are some observations:
Why do you run a open file on the c:\rui\a path on the first iteration and then just convert the refnum from open to a path again? If you have a file called a then that file will be opened and never closed...leaving it open...If you just need the path then no open is necessary.
The loop outputs the paths:
0: c:\rui\a (in this case a is opened)
1: c:\rui\a1
2: c:\rui\2
3: c:\rui\3
Is this really the name of the files you want to write?
Now - if these files already exist in that directory...then they will probably not be overwritten unless you do edit the write BMP function to do so.
What do you do with the open "a" file, it should be closed somewhere (if it really
is a point in opening it(?)).
If you probe the different wires you should be able to see what happens after the first 10 files...is there a valid image out from the Snap.vi? If there is try probing inside the write...