Added code to get column names

Filled out the writeMetaData method with code to get the column names.