fixing creating the log directory properly.