Added setRootDir() method to set root directory for thumbnail