Closing a root file improperly

this post is duplicated at Closing a root file improperly
let’s continue the conversation on the other thread.