in reply to die send to stdout & stderr
Then don't use die. die always outputs to STDERR (the error channel). You could write a subroutine die_STDOUT like this:
sub die_STDOUT { print STDOUT "@_\n"; exit 1; }; [download]