Redirecting output into the GUI.