cleanup & logging.