Added some connection testing code