adding generation of metadata json file into processing script