improve auto_filetype()