Updated function that parses config file.