changing output filename to include detection table and SN name