Added Connection Error trapping