added priniting metadata to csv or json files