Is line bundle determined by the parameter space and fiber?

f:X-->Y is flat and projective map between integral varieties over k, an algebraically closed field. Suppose every fiber at closed points of Y is still an integral variety. L is a line bundle on X, if f_*(L) is trivial line bundle on Y, and for every closed point y of Y, L_y is also a trivial line bundle on fiber X_y, can we deduce that L is also a trivial line bundle on X?

-

Yes, you can. This follows from the see-saw principle for instance. You can also argue directly as follows. The spaces of global sections $H^{0}(Y,f_*L)$ and $H^{0}(X,L)$ are naturally isomorphic. Since $f_*L$ is a trivial line bundle we can choose a global nowhere vanishing section $e$ of $f_*L$. Let $s \in H^{0}(X,L)$ be the section of $L$ corresponding to $e$ under the above isomorphism. To show that $L$ is trivial it suffices to check that $s$ does not vanish anywhere. But if $x \in X$ is a closed point where $s$ vanishes, then if we restrict $s$ to the fiber $X_{f(x)}$, we will get a section of the structure sheaf of integral projective variety which vanishes at a point. Thus the restriction of $s$ to $X_{f(x)}$ must be identically zero. This shows that $e$ vanishes at $f(x)$ which is a contradiction.