code to parse the config file