Added connection timeout (defaults to 5 seconds)