automatically create log directory