Always wait on the thread before emiting finished

This ensure that there would be no way to have two thread running

Refactor all the location where finished is called in a single function