Fixed creation of output window. Checking if it already exists before creating it.