More robust lattice file handling (trim the line to avoid blank line with tabulations for example