check both file and filename

README says to use filename property, but it only checks file property.
To maintain backwards compatibility it should check both.