Got it, I simply put the set_variables transformation in the end AFTER the file gets processed then, on the next iteration, if there is no file, I checked if the variable exists using simple evaluation, if it exists, no email is sent. Thanks