add switch for saving field precision (double/single)