dir check added