doc and error messages