Added custom logging.