added log, and changed to waitForConfirms()