Tidied up logging once again