Added support to write struct data type