Small debug main (make consistent with global config variable), and fix crash when segfault for lrs.