This seems like the wrong way to return multiple objects. Also, why do you need to return the filename when it's passed in?