Make component to wait for solution to finish before iteration

I am trying to create iterative process from Grasshopper doing following :

  1. Get list of STL files in folder path
  2. foreach STL files, open STL in Rhino
  3. Get objects in Rhino active document to Grasshopper
  4. Save modified objects as 3dm
  5. Open next STL file and start over

I have no problem doing 1 to 4.

Problem I have is that I want to make triggering component that waits for the entire solution to finish(wait for 3dm file to be saved) and get next file and start the solution again.

Counter script using timer component which seems to be doing its job(waits for the solution to finish and starts again) which I do not want to use. Instead I want to make a component that triggers incremental numbers that waits until previous solution is executed.

I appreciate your help in (21.5 KB)