Fail early if the file type is not recognised