in reply to Daemon dies instantly
strace is usually of great help in such cases...
$ strace -f ./your_proxy.pl [download]
And if you suspect the issue is file related, you can increase the signal/noise ratio with
$ strace -f -efile ./your_proxy.pl [download]