added code for tracking the connection  error warning