fixed typo and configDir validation