changed to reading typescript from a file, rather than a string in memory