add dir support for config mode 2