>TRY > MessageFullFileName = ALLTRIM(THIS.HL7OutDirectory) + SUBSTR(SYS(2015),4,8) + ".HL7" > STRTOFILE(THIS.oSendData.strProcessData,MessageFullFileName,0) >CATCH TO oException > MessageFullFileName = ALLTRIM(THIS.HL7BackupDirectory) + SUBSTR(SYS(2015),4,8) + ".HL7" > STRTOFILE(THIS.oSendData.strProcessData,MessageFullFileName,0) >ENDTRY >What you've actually found is some interesting behaviour on the part of STRTOFILE(). If the target folder doesn't exist, the command does not error, it appears to simply do nothing.