Log() and ShowAlertDialog() modified