If you click the Cancel button, rather than the Open button, the file method answers nil.
Cancel
Open
file
nil