Use signals to transfer control to GUI thread