use volatile bool as thread terminating flag; add *.log to .gitignore