You would probably be better off putting the file into /home/xxx with a different file name every time, and running a (cron) script on wxyz that decides whether to move the file to yyy, or append it to an existing file in yyy.
The script should check to see if any process is using either file before doing the move/append, that is make sure that the file transfer is complete, and that the file in yyy is not being processed.
#!/usr/bin/perl
use warnings;
use strict;
use Net::FTP;
my ($host, $user, $pass) = qw(<host> <user> <pass>);
my $_file = 'xxx.dat';
my $ftp = Net::FTP->new($host, Debug => 0, Timeout => 240)
or die "Cannot connect to $host: $@\n";
$ftp->login($user, $pass)
or die "Cannot login ", $ftp->message;
eval {
$ftp->size($_file)
};
$@ ? $ftp->put($_file) : $ftp->append($_file, $_file);
$ftp->quit
or die 'Failed to disconnect ', $ftp->message;