close #182 create log directory if not exist