Writing to ES example