def read_config_file(config_file):
    """
    Reads the config file and returns a dictionary of the contents.
    """
    config = {}
    with open(config_file, 'r', encoding='UTF-8') as file:
        for line in file:
            if line.startswith('#') or not line.strip():
                continue
            key, value = line.strip().split('=', 1)
            config[key.strip()] = value.strip()
    return config