split functionality into LogDir