outputting to 2 files