sys_get_temp_dir and optim