dump SQL queries to file