Can you please let me know:
1) Which view you execute the script from
2) Which source and destination format you convert from/to
Here's a fix:
I have also optimized the script by using a new script function; Using host.UniqueTracks instead of host.Tracks.
By using this function, the code will not be repeated for each subtrack, instead it will work with unique filenames only.
The revised script is attached.