Scan: Fixed bug causing the error log not to appear when there are errors