Adding message display code back into checkConnection()