Added more accurate logging.