The pseudo looks something like
Code:
File f = ReadFile();
int i = LastNumberInputted(f);
i++;
SaveNextRecord(i,Data);