fix logger to create log directory if not exists