Improved error message in assertion