Lots of logging added.