Add API method WriteIndexDfiFile and modify method WriteData