Add API method WriteFieldDataFile and restore output function of dfi file in method WriteData