Improve config file reading