improve read config