code: static String scanConfigFile(String dirPath) throws ConfigurationException {
  
          String filePath = dirPath + File.separator + CONFIG_FILE_NAME + ".";
  
          String fullFilePath;
          // Scan for Yaml file
          if (AuditUtil.isFileExists(filePath + YML_EXTENTION)) {
              fullFilePath = filePath + YML_EXTENTION;
          } else if (AuditUtil.isFileExists(filePath + YAML_EXTENTION)) {
              fullFilePath = filePath + YAML_EXTENTION;
          } else if (AuditUtil.isFileExists(filePath + XML_EXTENTION)) {
              // Scan for XML file
              fullFilePath = filePath + XML_EXTENTION;
          } else {
              // Default configuratin file
              fullFilePath = filePath + YML_EXTENTION;
              generateConfigFile(fullFilePath);
          }
          return fullFilePath;
      }
docs: Scan config file.
  
  @param dirPath the dir path
  @return the string
  @throws ConfigurationException the configuration exception