Close sql rows on error
Implement formation stream resumption