+try
+{
+SGCONF::CONFIG configOverride(config);
+
+if (config.configFile.empty())
+ {
+ const char * mainConfigFile = "/etc/sgconf/sgconf.conf";
+ if (access(mainConfigFile, R_OK) == 0)
+ block.ParseFile(mainConfigFile);
+ ReadUserConfigFile(block);
+ }
+else
+ {
+ block.ParseFile(config.configFile.data());
+ }
+
+config = configOverride;
+}
+catch (const std::exception& ex)
+{
+std::cerr << ex.what() << "\n";
+return -1;
+}
+
+std::cerr << "Config: " << config.Serialize() << std::endl;
+