Fix early closing withoyt saving and deleted console messages when
logging.