Fix detect logDir