Additional logging statements
Added threading checks