ADD read config from a separate file + minor fixes