validate file