updated log.sh