I am re-assigning filename later, so using a constant reference won't work.