Hey , i have code that reads an input file and generates an output file .For reading the input file we have a xml file.If there is an error while reading or writing the output file the an errored file is generated.But in the errrored file the fields are not coming as in accordance with the reader xml .they are coming randomly .In the module for reading and writing the errored file list is being used . What should be done to write in the errored file as the reader xml fields.

Thanks in advance