A bit of logging added.