Added context manager to the console window