SaveDocument in GaugeEnterHandler modified. Closes #16