Writes downloaded to files