remove dontThrow option from waitForClose