Checks for correct file format