read process output on a separate thread to keep ui up to date