You can't edit a secondary file if the edits will change the offsets. Adding or removing even a single character from the secondary file can cause errors when later importing objects. If you edited a secondary file and then get errors when you try to import it, replace the edited file with an unedited backup copy.
If you did not edit the file, first examine the application log and the secondary recovery files. If other objects of the same type migrated successfully, compare the objects in the recovery file with the objects in the migration files. Check whether the offsets from the primary file match the entries in the secondary file, and check for conversions that might have altered the end-of-line characters.