code: 	public static File checkSlip(File parentFile, File file) throws IllegalArgumentException {
  		String parentCanonicalPath;
  		String canonicalPath;
  		try {
  			parentCanonicalPath = parentFile.getCanonicalPath();
  			canonicalPath = file.getCanonicalPath();
  		} catch (IOException e) {
  			throw new IORuntimeException(e);
  		}
  		if (false == canonicalPath.startsWith(parentCanonicalPath)) {
  			throw new IllegalArgumentException("New file is outside of the parent dir: " + file.getName());
  		}
  		return file;
  	}
  