Logging fix

Wasn't checking for directory