When using loops in Integration Services you can set the value of sub tasks using expressions. If these epxressions are to be based on the values obtained in the loop I advise that rather than using a complex expression in the task. Instead set a variable to be the complex expression and then set the expression of the task to that variable.
This allows very easy debugging, because you easily see the variables at runtime in the debug windows (Locals)
You can then reuse that value multiple times, i.e. if you want to obtain the name of the file not the complete path. This variable can then be passed to say a script task to provide additional logging/debug information.