if exists trouble :-(

Can anyone spot why this script isnt working?
this is the error I get when running it:
“Can’t make file “G5 Master:Users:dylanh:Library:Preferences:Adobe InDesign test1.rtf” into type reference.”

tell application "System Events" to set CrntUser to (name of current user)
tell application "System Events" to set HD to (name of startup disk)
set fileRef to "Adobe InDesign test1.rtf"

--Checks to see if file exists
if file ("" & HD & ":Users:" & CrntUser & ":Library:Preferences:" & fileRef & "") exists then
	display dialog "Found"
	
	
else
	display dialog "Not found"
end if

Any ideas?:frowning:

never mind, I found the error
I forgot to “Tell application “finder”” d’oh :smiley:

set filename to "Adobe InDesign test1.rtf"
tell application "System Events"
	if file filename of preferences folder of user domain exists then
		display dialog "Found"
	else
		display dialog "Not found"
	end if
end tell