Added error handling - ECONNRESET error