Fix the demo crash when it fail to execute before init_workers.

The root reason is that the wdata is initialized in init_workers and there is no check of wdata in exit_cleanup.
So the program will crash if it fail to execute before init_workers.