m_logfile is dumped to terminal on program exit; many cleanups;