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

...t.
if you log here but don't rethrow the exception, then all the other loggers you placed above will never be executed. This method should never log, that's a concern of whoever is calling this method.

This is exactly the kind of silly bug why it's nice to have a test case :)