restart updating when queue is empty
remove log
add test
add commentaries
Update update.js
Merge pull request #3 from Papiel/update-after-crash

Update after crash