in reply to Re^2: Substitution don't work
in thread Substitution don't work

but I still get an empty file Out.txt.

You should print if you want your program to produce some output.