Fixed file type index to filter out non-files.