validate file format