Fix bug in utf-8 validation + Improve error message