add pthread check