@viart It's probably different in the nodejs world but in the Native Hell generating temporary file names with random numbers is considered as dangerous. What about https://www.npmjs.org/package/tmp ?