printing to json if already exists