Added close for consoles.