Wire up document saving.