prepare log dir