add timeout to curl connection