Scanner error logic