More work on logging