Added rudimentary logging.