private File validateAndGetFile(String fileName) throws StoreException {
    String filePath = partitionToMountPath + File.separator + fileName;
    File file = new File(filePath);
    if (!file.exists()) {
      logger.error("File doesn't exist: {}", filePath);
      throw new StoreException("File doesn't exist: " + filePath, StoreErrorCodes.FileNotFound);
    }
    if (!file.canRead()) {
      logger.error("File is not readable: {}", filePath);
      throw new StoreException("File is not readable: " + filePath, StoreErrorCodes.AuthorizationFailure);
    }
    return file;
  }
Validates and retrieves a file from the file system.
@param fileName The name of the file to retrieve
@return File object representing the file
@throws StoreException if the file doesn't exist or is not readable
ambry-store/src/main/java/com/github/ambry/store/FileStore.java