Add Dialog message in case of no network activity.
Clean up other codes.