add -l option, can save output to a log file now