Print a warning when terminating instead of dying immediately

This way, the warning message is more likely to be seen than it it were mixed
in with the program's output at the beginning.