Added timeout and retry limit for dig command.