changed tmp-folder to sys_get_tmp_dir