Read config file according to flag