FTP Problem (Intermittent)

I am having problem with ftp not indicating any error, but my customer is complaining that their response file is not present on their machine. This only happens a couple of times a day. Is there a debugging option I can turn on to the trace the ftp command. I have a return code displayed and it indicates a success.

We have found the ftp status code is not the best thing to key success from. What we do,

1) capture the output of ftp to a log file.

2) after the transmission, is do an "ls" of the target file we tranmitted.

3) scan the log file for that file name, if not exist, it didn't get there.

Hope that is a simple enough explanation so it can be coded.

use -v -d flags for verbose and debugging.