print more detailed error message to help fix the test error related to scan.
Merge pull request #1446 from nouiz/scan_tests

print more detailed error message to help fix the test error related to ...