Added logging.
Backwards compatibility.