There is a mistake in the following argument but I cannot see where. Can someone help me, please?
Let $C$ be any smooth curve of genus $g\geq 1$ and $D$ a general effective divisor of degree $g+2$. Then given any pair of points $p,q\in C$, we have by Riemann-Roch $h^0(K+p+q)=g+1$ so we get a morphism $$\phi:C\rightarrow \mathbb P^g$$ given by the sections of $K+p+q$, where $\phi(C)$ is non degenerate. Then since a general set of $g+2$ points are not contained in a hyperplane of $\mathbb P^g$ and $\phi(C)$ is non degenerate, $h^0(K+p+q-D)=0$ so that, $h^0(D-(p+q))=h^0(D)-2=1$ which means that $D$ separates points and tangent directions so it gives an embedding of $C$ in $\mathbb P^2$.