Improved configuration file reading