debug scanner source, and test scan()