Adds logging.