writes to multi file