Some comments:
1) When the download method is called you use 2 parameters:
my $dhReturned = $apifs->downloadFile($remoteFolder,$localFolder);
and it is supposed to be only one:
my $dhReturned = $apifs->downloadFile($remoteFolder);
2) You are using
# 1 -> Stop application any exception is received
ApiPerlClient::setDieIfError(1);
that, as...
2009-08-03 22:21:41 UTC in fura ( Grid Middleware )