fix: not checking return value of mkstemp()