add and update log