Added checks for network connectivity on posting so that the app won't hang when trying to post without network