threading, creating dirs, logging