[TypeScript] Read back contents of output file only if run successfully