Flush logs before quitting worker process
Merge pull request #178 from Ecco/master

Flush logs before quitting worker process