fixed reading of config file and unmarshalling