autodetect script. Fixed some nogt errors. changed analysis output