fixed error checking
fixed iso date being passed into documents.add() and fixed issue with suborg decode using all orgs rather than current org