update getfilename method