Use mkstemp() for partfiles