Add descriptions for wait functions. Make error messages more detailed.