I figured that was it. But I used the Eval approach to allow me some measure of monitoring and control. The script will be in production and automated though our Scheduling system. Is there a way to create a dummy or placeholder version of $sftp at the very beginning and then replace it by the actions in the Eval block?