Usually, I just open and read the file. Next, I put the contents into variables. If the contents happens to be empty, then I use a default value. This makes it unnecessary to check that the file exists and, more importantly, is more compatible with future versions of your software.
on readPrefs
put specialFolderpath("documents") & "/prefs.dat" into myPath
put url ("binfile:" & myPath) into myPrefs
// here, the result may contain "can't open file"
put line 1 of myPrefs into gHighscore
if gHighScore is empty then put 0 into gHighscore
put line 2 of myPrefs into gLicenseKey
if gLicenseKey is empty then put "unregistered" into gLicenseKey
end readPrefs
You could also check for the file and use a slightly different script:
on readPrefs
put specialFolderpath("documents") & "/prefs.dat" into myPath
if there is a file myPath then
put url ("binfile:" & myPath) into myPrefs
put line 1 of myPrefs into gHighscore
put line 2 of myPrefs into gLicenseKey
end if
if gHighScore is empty then put 0 into gHighscore
if gLicenseKey is empty then put "unregistered" into gLicenseKey
end readPrefs
More variations are possible, e.g. you could check the result and set default values if the file can't be opened.