Refactor config file implementation. Previous version was not reading correctly, and returning empty strings.