saving error to the file for gnuplot