rename temp_check to tmp_check