added a debug thread in cos_loader