Tidied a bit of logging