Added variadic version of write_structure