Declare variables earlier so sftp download works