if build debug instead of assert
revising error messages