Append to error.txt instead of write.