Yes, you do and you have to fill out the $outfiles array so Switch knows what output files your script created. See the Switch help: Introduction - Advanced topics for designing flows -Javascript for applications.