Under construction: Write SQL output to file.