Improved config file parser