Add required parameter to WaitUntilEmpty

Catch the correct exception here..