First stab at making sql logging threadsafe
Moved from depricated threading API to shiny python3 newness
Cleanup sql.py