added log dir writable check