use the wait instead of the callback
add logging