fix the algo, show the file name in the title