Give a proper error message when config is not utf8 encoded. fix #2121