code: public static boolean isFileImportable(File file, String prefix) throws SQLException, FileNotFoundException{
          if (isExtensionWellFormated(file, prefix)) {
              if (file.exists()) {
                  return true;
              } else {
                  throw new FileNotFoundException("The following file does not exists:\n" + file.getPath());
              }
          } else {
              throw new SQLException("Please use " + prefix + " extension.");
          }
      }
docs: Check if the file is well formatted regarding an extension prefix.
  Check also if the file doesn't exist.
  
  @param file
  @param prefix
  @return
  @throws SQLException
  @throws java.io.FileNotFoundException