update mkstemp
close new created file before exit.
update tempnam(dir,prefix)