Added logging. Sleep/wake/power works now.