Updated registry handling and logging.