function loadConfig (configPath) {
  try {
    const configData = fs.readFileSync(configPath, 'utf8')
    const loadedConfig = JSON.parse(configData)

    // Merge with default config to ensure all properties exist
    return { ...config, ...loadedConfig }
  } catch (error) {
    logger.error(`Error loading config file: ${error.message}`)
    logger.info('Using default configuration')
    return config
  }
}
Load configuration from a JSON file
@param {String} configPath - Path to the config file
@returns {Object} - Configuration object