add log dir creation.