Improved scanner error message