Initial Work to write Metadata