added FTP connection retry logic