use buffer-file-name to get file name, not buffer-name