Added directory checker.