code: public static void checkFileValidity(String filename) throws IOException {
      File file = new File(filename);
      if (!file.exists()) {
        throw new IOException(ExceptionMessageMap.getMessage("020001") + "  { filename=[" + filename
            + "] }");
      }
    }
docs: Checks that the specified filename exists. This assumes that the above check for string
  validity has already been run and the path/filename is neither null or of size 0.
  
  @param filename
  File or directory path