Ensure the cache-directory for ImageIO is set to a valid directory Introduce a helper method to set ImageIO.setCacheDir() to the default temporary directory