log dir, emv var fix