Fix to logging
Actually working logging