API modification to write label parameter in final file