debug text box is only updated in gui thread