do not throw exception in function waitForMessage