Check internet connection before sync

Signed-off-by: Andrey Zhdanov <andrjufka@gmail.com>