updated scan detector

got segfaults dealt with

updated printout