updated showAlert to also log to console