write out two files