Let $X$ be a singular curve over an algebraic closed field $k$ with characteristic zero. Let $Z$ be the closed subset of singular points on $X$ and $U=X-Z$ be the smooth part, which is an open subset of $X$.
Let $\mathcal{L}$ be a line bundle on $U$. Could we always extend $\mathcal{L}$ to a line bundle on $X$, i.e. could we find a line bundle $\widetilde{\mathcal{L}}$ on $X$ such that $\widetilde{\mathcal{L}}|_U\cong \mathcal{L}$? If not, do we have counter examples?