code clarity
Extended at_exit usage. Use with care!
use the new at_exit facility to ensure that log files are disconnected.