refactoring for config file reading at core level