Added asyncWriteFileIfDataSet.