Avoid leaking stack data into temporary file