Finalize logging