Further modified logging statements
Implemented multithreaded query lookup and logging submission.