Multiple inputs to save into a file! failed to write to file: Error: write after end

Hello. That would be very helpful so that at least it's safe even if I mess something up while upgrading. How can I do that?