only check for keep_temp once