fix code in scan, cscan to match queue.txt; update output.txt