modify emails.pig to write to json storage