feature: restricted disconnection exception handler to producer only.
feature: changed WriteMode to AppendMode in file writing.