validating file