Rename flags for clarity
Move open() and mkdir() to logger thread
Merge branch 'rewrite/logthr'