Invalid name when running stata do file : I am getting "Invalid name" when running the following code

    foreach i in 2008 2009 2010 2011{
    disp `"Working in Year `i'"'
    tostring `i', local(yearStr)
    disp `"yearStr"'
    graph bar E if Year=="'i'", c(1) name ('i',replace)
    histogram E if Year=="`i'", c(1) name (`yearStr',replace)
    }

What I am trying to do is plot a graph bar between years and "E" by choosing the years 2008 2009 2010 2011 from a dataset that I have already input. But whenever I try to run the code, the same error is found.

Error :

        Working on year 2008
    2008 invalid name
    r(198);


Many Thanks