give more useful error message when trying to write unstructured data to unstructured file (closes #11)