added dir check & creation