FTP - need to send error to txt file

I've written a script to FTP files into a directory, perform a diff between the current and the previous and email out the results. Sometimes a machine falls off the network and needs to be rebooted to reconnect. Obviously I don't get the file I want at that time. How do I get the FTP error to be written to a file that I can send out with the email?

I'm working on an HP-UX system if that helps answer the question.

Here's the section of code that's of concern.

cp blank.txt ${tool}/errorlog.current
ftp -i nsr100 <<EOF
get ${tool}\"mcsv\ pass\"::[mcsvlog]log_err.log ${tool}/errorlog.${now}
quit
EOF
diff ${tool}/errorlog.${yesterday} ${tool}/errorlog.${now} >> ${tool}/errorlog.current

When it fails I get this output on my screen:
Failed to open file.
diff: input file nsr3/errorlog.Oct19: No such file or directory

So basically what I need to do is if the FTP returns an error, write a line to a file that says "no current logfile from ${tool}. ${tool} has likely fallen off the network. Please investigate and correct."

Thanks in advance.