check that the file attribute is valid