Fix issue in logger
Add ability to set number of working threads