improved error message for Illegal char