Simpler getFilenameFromFD