Move logging stuff around a bit