Expect script file transfer failure

I use expect to spawn an sftp file transfer. On occasion the transfer fails or doesn't complete correctly, resulting in:

"sftp> cd /returns
sftp> rename /returns/TESTFILE.TXT /returns/archive/TESTFILE.TXT
Couldn't rename file "/returns/TESTFILE.TXT" to "/returns/archive/TESTFILE.TXT":
 Failure
sftp>
File move complete. Please wait..."

Here is the expect script:

#! /usr/bin/expect -f
set timeout 10
set uname "[lrange $argv 0 0]"
set upass "[lrange $argv 1 1]"
set ufile "[lrange $argv 2 2]"
set ufiler "[lrange $argv 3 3]"
set prompt "sftp> "
spawn /usr/bin/sftp ${uname}@ftp.secureserver.com
expect {
    "Are you sure you want to continue connecting (yes/no)?"    {send "yes\r"}
    "${uname}@ftp.secureserver.com's password:"    {send "$upass\r"}
    "insufficient"    {exit 5}
    "refused"    {exit 1}
}
expect {
    "${uname}@ftp.secureserver.com's password:"  {send "$upass\r"}
    "refused"    {exit 1}
    "$prompt"    {send "cd /returns\r"}
}
# I've tried parsing the above failure message every way I can think  of, including using the entire message, but it won't do the "exit 1"
expect {
    "$prompt"    {send "rename /returns/$ufile /returns/archive/$ufiler\r"}
    "Failure"    {exit 1}
}
expect {
    "$prompt"    {send "quit\r"}
}
# I'd like to send this message based on success or failure, too.
send_user "\nFile move complete. Please wait...\n"

Any suggestions?

Thanks.

Oh, the operating system is SCO Unix Openserver 6