cleanup on close & proper console configuration