If the window is destroyed, write any further messages to stdout instead