Csv input to website, want save output into another csv along with the input

I am taking a input from csv file and extracting the output in other csv file but want to add the same input in that csvfile to see the connection as to output is belong to its relative input keyword

Here the solution