Better logging
Move logging out of the way