writes individual files