writing errors to file, renamed old output files