making log dir if nonexistent