write whole files, for speed