Added validity for file format