For GUI, console window should be foreground