Writes file after edit

Works with S3 buckets