Fix bug in detection file parsing. Still so much to do