Writing out to file complete