Added maximum retries to Adapter in order to be more tolerant about I/O errors