Improve exceptions handling in created threads

Change-Id: I688a8070c4ce8782329ee5fc7be0dc0cc5dabe29