in reply to Program unexpectedly terminates

Anonymously speaking, the place to start is by adding print STDERR I am here now messages throughout the code. Watch for the last one.