Added some extra logging.