Solution
This issue occurs because the script generates the file with a leading space in the file name:

Windows cannot store files with a leading space so the file with that name does not exist in your computer. To solve this:
- Change the extension of the TDM file to a .zip file:

- Once the TDM file is converted to a ZIP file go ahead and unzip the file, and you will see a header.xml file, open the header.xml with a text editor and erase the leading space:

- Finally, zip back the folder and change its extension back to .tdm file extension and the TDM should work correctly.