added optional argument to invfold. made update to parameter file determination