check connection regularly