added support for encrypted tps files