outputting to file complete