Added wait into error tests.
Changed error message.
Removed dead code.