What is "FileContents"?
If it is more than 1 line, that is not going to work. If it is only 1 line and creates a valid filename, each time you loop you are going to overwrite the previous one.
I think FileContents is a list; if that is the case, instead of "For each" do a loop.
Only assuming %FileContents% is a list in the same order as %Files%:
After get files to %Files%
Loop starting at 0 to %Files.Count - 1% increment 1
Whenever you want to reference the Current File, in replace of %CurrentItem%, use %Files[LoopIndex]%
Whenever you want to reference the current line of File Contents, use %FileContents[LoopIndex]%
Now it should name them appropriately.