Added console logging.