Adding more details to logging

Fixing the multithreading and adding more logging