Use the temporary directory defined in ENV, not the storage root
Do not leave tempfiles behind when errors occur