Properly close log upon shutdown of replica.