fix alert in update

`alert()` is not valid in nodejs, so I
just replaced it by `console.log()`.