use while instead waituntil
add log text