Isomorphic direct images of sheaves on product space

Let $f:X\rightarrow Y$ be smooth family of complex curves over $Y\backslash S$, S-finite set, Y-smooth complex curve. Let $Z \rightarrow Y$ be a ramified covering, ramified over points of $S .$ Let $W$ be a normalization of $X\times_{Y} Z,$ and we have the induced map $g:W\rightarrow X.$ If $\mathcal{F},\mathcal{G}$ are locally free sheaves on $W$ and $g_{*}(\mathcal{F})= g_{*}(\mathcal{G}),$ do we have that $\mathcal{F}=\mathcal{G} ?$

In general no. For instance take $Y = P^1$, $X = P^1 \times Y$, and take $S$ to be 4 different points. Then $Z$ is an elliptic curve and $W = P^1 \times Z$. Take $F$ to be (the pullback to $W$ of) a nontrivial line bundle on $Z$ of degree $0$. Then $g_*F$ is (the pullback to $X$ of) the pushforward of that line bundle w.r.t. $Z \to Y$. It is easy to see that this pushforward is isomorphic to $O(-1) \oplus O(-1)$, independently of the choice of $F$. In particular, if $G$ corresponds to another nontrivial line bundle of degree $0$, then $g_*(F) \cong g_*(G)$, but $F \not\cong G$.
• is there any condition that we can add to the map $f$, in order that this holds ?If the map $f$ is a semistable non isotrivial fibration , does it change the situation? – And Rub Sep 1 '16 at 17:12
• @AndRub: As you see, the problem is not with the map $f$ (you can even take $f$ to be the identity map, still the same counterexample works), but with the map $Z \to Y$ that takes non-isomorphic objects to isomorphic objects. – Sasha Sep 1 '16 at 18:09