correct bug using config.rootPath rather than config.path