Final solution for Use Case 3
Added debug logging for lifecycle methods