Add check of number of variables for SPH format