Support for stream reconnecting, plus more logging