added file format validation