adds data output to file