change power management and fix debug log