Logging and quitting.