Fix logging on container close