Brownian motion an stopping time expectation I need a check in the folliwing exercise, which is an application of the optional stopping theorem.

let $T= \inf \{ t \geq 0: |B_t|=a \}$, $a \geq 0$, and $B_t$ a standard Brownian motion. By using the $\mathcal{F_t^+}$-martingale $(B_t^2 - t)_{ t \geq 0}$, show that $$E[T] = a^2$$


Here's what I did:
First I used consider the stopped process $(B_{t \wedge T}^2 - t \wedge T)_{t \geq 0}$. It's again a martingale, and by the optional sampling theorem $$E[B_{t \wedge T}^2 ] =E[ t \wedge T)] $$
(I can apply the Optional sampling theorem since $t \wedge T< t$)
Now, I notice that $t \wedge T \rightarrow_t T$, and so by Monotone Convergence thm: $$\lim_t E[t \wedge T] = E[ \lim_t t \wedge T]= E[T] $$
Moreover I notice that $$B_{t \wedge T}^2 \leq a $$ since if $t \wedge T = T$, then $B_{t \wedge T} = a$, else if $t \wedge T = t$, then $B_{t \wedge T} < a$ (otherwise, if it would be greater than $a$,$B_t$ would had hitten $a$).
So, by DCT: $$ \lim_t E[B_{t \wedge T}^2] =_{(DCT)} E[\lim_t B_{t \wedge T}^2] = E[B_T^2] = a^2$$
and the result follows.
Is everything okay? I want to be sure that all the steps are motivated in the right way!
 A: This is almost perfect, except you do not precise why $T$ is a.s. finite, as pointed out by Xiaohai. 
But this is also already in your analysis since
$$E[T] = \lim_{t} E[T \wedge t] = 
\lim_{t} E[B_{T \wedge t}^2] \le a^2$$
hence the r.v. $T$ being integrable is a.s. finite. From this point your reasoning is OK.
A: I think the proof is flawed in this step:
$$ \lim_t E[B_{t \wedge T}^2] =_{(DCT)} E[\lim_t B_{t \wedge T}^2] = E[B_T^2] = a^2.$$
Without first establishing $T < \infty$ a.s., one can not claim $E[B_T^2] = a^2$ (in fact, $E[B_T^2|T=\infty] < a^2)$.
Full proof:
For $n\ge 0$, $P_0(\{B_n\ge a\ \ i.o.\}) \ge P_0(\{B_n/\sqrt{n}\ge a\ \ i.o.\}) \ge \limsup P_0(\{B_n/\sqrt{n} \ge a\}) = P_0(\{B_1 \ge a\}) > 0.$ 
Note for any $m > 0$, $\{B_n\ge a\ \ i.o.\} = \{B_n\ge a, n \ge m,\ \ i.o.\} \in \sigma(\mathcal{F}_t^+, t\ge m)$. Hence $\{B_n\ge a\ \ i.o.\} \in \cap_{m \ge 0}\sigma(\mathcal{F}_t^+, t\ge m)\equiv \mathcal{T}.$
By 0-1 law for Brownian motion, we have $P_0(\{B_n\ge a\ \ i.o.\})=1$. Since $B_t$ is continuous, $1 = P_0(\{B_n\ge a\ \ i.o.\}) \le P_0(\{B_n \ge a\ \text{for some }n\}) \le P(T< n\ \text{for some }n) \le P(T < \infty).$ Hence $P(T < \infty) = 1$.
Let $X_t=B_t^2-t, t\ge 0$. Then $X_t$ is a martingale and $T$ is a bounded stopping time. In view of the optional stopping time theorem,
$$ 0 = EX_0=EX_T=EB_T^2-ET. $$
Hence 
$$ET=EB_T^2=E(B_T^2;T<\infty) + E(B_T^2;T=\infty)=E(B_T^2;T<\infty)$$
$$=E(a^2;T<\infty)=a^2P(T<\infty)=a^2.$$
