hack fix typescript by using tmp files