file write examples and removed addTo param