You are checking ftp's exit status and not the status of the files transfer which is different.
Though a file is not transferred, the execution of the ftp client might successfully end which means $? will return 0 { success } if its not with respect to the application.
So, direct the output of ftp client to a logfile and parse that.