MULE-8054: Adding check to make sure the folder is open before closing i...

...t.
no it's not... complete method is: