Modified TMSReport.py