File validator script