ftp logic