added dir check/creation to getLogs