Fix a bug when creating Config directory