stick a .sql on the end of tmpfile for syntax