add check so that upload, update, delete and download are executed only when no connection errors occurred.