See the second button on your screenshot?
If you hover over it you will see "Disable clear output script panel on run".
Deselect it.
That option clears the output panel everytime a script runs. The fact that you are getting those other messages means that you have other scripts enabled .
I'm guessing your script _is_ writing to the output panel but then another passive script runs after it and clears the panel.