Log func. added for inspecting life cycle of app