change nx, ny, nz in the pfb reads to nxtemp, nytemp nztemp so that it doesn't overwrite the user input nx,ny,nz from the slimin file.
would also be good to add a check when the read happens to error out of the pfb dimensions don't match the user specification.