The weekly audit files end in _123.cv pattern so the current code is just checking for the highest 3 numbered like that and going through them.
The nightly files are named with the date on the end _2022_10_25.csv.
If there are 3 files or less this isn't a problem as it will go through all of the files but once some missing transactions are found it will start to stack up.
Need to figure out how to look at the latest 3 files in the folder.
Found when testing T314753: Use nightly rather than weekly audit file for Adyen