Added support to assign log dir.