fix bug in domain settings form when cloudcare setting not shown

also better error logging

http://manage.dimagi.com/default.asp?106712