Reimplemented some logging.