Added connection testing