The continuity of the expectation of a continuous stochastic procees Let $X_t$ be a continuous stochastic process on a filtered space $(\Omega, \mathcal F, \mathcal F_t, \mathbb P)$. 
Is $\mathbb E[X_t]$ necessarily a continuous function?
My first answer would be no. For example if $X_t$ admits densities $f(t,x)$, the first  equality in:
$$\lim_{t \rightarrow t_0} \int_{\mathbb R} x f(t, x) dx=\int_{\mathbb R} \lim_{t \rightarrow t_0} x f(t,x)=\int_{\mathbb R} x f(t_0,x) $$
requires $f$ to be continuous in $t$ uniformly in $x$ to hold. 
Examples where $\mathbb E[X_t]$ is indeed continuous are abundant. Counterexamples where it is not? Thanks.
 A: One counterexample is the following:
Let $B_s$ be a standard Brownian motion, and let $S = \inf\{s : B_s = 1\}$ be the first time it hits 1.  Since Brownian motion is recurrent, $S < \infty$ almost surely.  Let $Y_s = B_{s \wedge S}$; then $Y_s$ is a continuous martingale and $\lim_{s \to \infty} Y_s = 1$ almost surely.  Finally, let $$X_t = \begin{cases} Y_{t/(1-t)}, & 0 \le t < 1 \\ 1, & t \ge 1.\end{cases}$$
$X_t$ is continuous since $\lim_{t \to 1^-} X_t = \lim_{s \to +\infty} Y_s = 1$.  But for $t < 1$, we have $E X_t = E Y_{t/(1-t)} = 0$ since $Y_s$ is a martingale, and for $t \ge 1$, $E X_t = 1$.  So $E X_t$ is discontinuous.
$X_t$ is a useful example to keep in mind; for instance, it is a local martingale with respect to its natural filtration, but not a martingale.
Edit: Hans asks in comments whether we can have an example where the second moments are finite but discontinuous.  The answer is yes.  Let $X_t$ be as above and set $Z_t = \sqrt{1-X_t}$.  Note that $X_t \le 1$ everywhere so the square root makes sense, and $Z_t$ is a continuous process.  Then we have
$$E[Z_t^2] = \begin{cases} 1, & t < 1 \\ 0, & t \ge 1 \end{cases}$$
which is discontinuous.  The second moments $E[Z_t^2]$ are not only finite but uniformly bounded.
Moreover, if we wish to consider variance (centered second moment) instead, notice that by continuity of $Z_t$, as $t \uparrow 1$ we have $Z_t \to Z_1 = 0$ almost surely.  Since we showed $E[Z_t^2]$ is uniformly bounded, we have that $\{Z_t\}$ is uniformly integrable (see https://math.stackexchange.com/a/184484/822), hence $E Z_t \to E Z_1 = 0$.  So as $t \uparrow 1$, $\operatorname{Var}(Z_t) = E[Z_t^2] - (E Z_t)^2 \to 1$, whereas $\operatorname{Var}(Z_1) = 0$.
