Adding cursor.cursor back (that was dumb) and more logging