Add pthread write