save lout/lerr/ldbg on exit