Replace file-name-base with file-name-nondirectory. It is more correct and compatible.