add output to file in log.sh