sys_get_temp_dir() would be better than hardcoding /tmp