added log.d() into the methods of the activity's lifecycle