Adjusted version detection and logging.