added error messages
added more retransmissions for better reliability
added support for sending statistics in protocol library