add pthread check only for thread mode