Add function for ValidFile