support json and yml and add configPath check