private boolean deleteFile(AsynchronousFileChannel fileChannel, boolean successfulThusFar) {
      if (fileChannel.isOpen()) {
        try {
          fileChannel.close();
        } catch (IOException e) {
          //ensures that any error code won't be overwritten thus far
          if (successfulThusFar) {
            diskHealthStatus = diskHealthStatus.DELETE_IO_EXCEPTION;
          }
          logger.error("Exception occurred when deleting a file for disk healthcheck {}", disk.getMountPath(), e);
          return false;
        }
      }
      return true;
    }
Attempts to close the filechannel and delete the file
@param fileChannel the file used for disk healthcheck
@return True/False depending on the close/delete was successful
ambry-store/src/main/java/com/github/ambry/store/DiskManager.java