Add debug logging to activity lifecycle events