Better exception handling on auto-reload.

Now runtime exceptions should not cause the thread to die.