Why not make an initialize method and pass the filename there. That way we can have this service as a dependency in the constructor and not have to get it from the injector.