Adding logging to activity callbacks