Prevent writing empty config.xml on parse errors.