Added the filename as a parameter.