Thank you very much! I don't know exactly what the error was, but I noticed that I apparently created two files with the same text (mes1.txt and message.1.txt), so I changed the first one to the second one in the script - and it worked.
It's strange that there is a dependency on the content. But if everything works now, that's fine.