Added validation for the file