I see the problem: my script was already running when I used screen. Now I started another connection, and used screen, started the script and detached it, and this way it works. Thank you for the idea and the help.
However, it would be nice to be able to suppress unnecessary messages. Every script should have this feature. I often experience that a large amount of screen output makes programs run slower.