Add explicit promise waits, add more logging.