Check internet connection before posting