"Before adding a new line, re-write all of its contents to the file." Are we supposed to write the file, add the new product to whatever data structure we have and then write the file again with the new data?