Returns True if the path is up-to-date w.r.t. our data product: i.e. exists, and is no older
        than the DP itself, or the module itself (the last check ensures that subproducts are remade
        if the rendering code changes.)

def subproductUpToDate(self, fpath):
        """Returns True if the path is up-to-date w.r.t. our data product: i.e. exists, and is no older
        than the DP itself, or the module itself (the last check ensures that subproducts are remade
        if the rendering code changes.)"""
        # subproduct is up-to-date if it is older than the file mtime
        if not os.path.exists(self.dp.subproduct_dir()):
            os.mkdir(self.dp.subproduct_dir())
        ## This caused many re-rendering whenever a plugin got recompiled, so I disabled it.
        ## Need to add a control for re-rendering.
        ##    if os.path.exists(fpath) and os.path.getmtime(fpath) >= max(self.file_mtime,self.module_mtime):
        if os.path.exists(fpath) and os.path.getmtime(fpath) >= self.file_mtime:
            dprintf(3, "subproduct %s is up-to-date, no need to regenerate\n", fpath)
            return True
        else:
            if not os.path.exists(fpath):
                dprintf(3, "subproduct %s does not yet exist, will generate\n", fpath)
            else:
                dprintf(4, "subproduct %s is out of date (timestamp %s, file %s, module %s), will regenerate\n", fpath,
                        time.strftime("%x %X", time.localtime(os.path.getmtime(fpath))),
                        time.strftime("%x %X", time.localtime(self.file_mtime)),
                        time.strftime("%x %X", time.localtime(self.module_mtime)))
            return False