sync QApplication exec and node

invoke app.exec if it hasn't run after the file has finished, to wait for node to be processed