Unable to fetch recording from cloud by using PMI

I done that already.
But the problem is, i am getting latest meeting recording only.
The script is running in background which check meeting is completed and then get that meeting id and fetch the recording in loop.

If i used PMI and if two meetings were completed, then i am able to fetch latest meeting recording only.