Correct write_files in cloudinit