Fix config file corruption issue