Added some basic retry logic