added logger and ability to close emulation peacfully entering quit. which is why there is a logger now to make sure logging is atomic and yada yada yada