Close logging's file handler explicitly when the session finishes.