log: Fix shutdown
log: Remove debug code