removed unused var "configDir"