Cleanup logger on exit.