Separated the code for reading the configuration