Fix threading/logging issues