The console throws a NullPointerException when a single #@File is used for the input.
However adding another field works.
Is it like for ImagePlus that the variable is supposed to be automatically filled with the current image ? except that there is no such thing as current File
Illustrative code: try to remove the #@String field to get the error.
#@File (label="test") myfile #@String (label="Some random string") text print myfile