fix logging, return better wait_delay