Tweaks to SDAT write.

Tweaks to SDAT write.