Built in crash handling in threads