Trying to re-fix the EOF and the illegal characters