<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def move_next_cache(self):
 """Moves files in the 'next' cache dir to the root"""

        if not os.path.isdir(self.songcache_next_dir):
            return

        logger.debug("Moving next cache")
        files = os.listdir(self.songcache_next_dir)
        for f in files:
            try:
                os.rename("{}/{}".format(self.songcache_next_dir, f), "{}/{}".format(self.songcache_dir, f))
            except PermissionError:
                pass
            except Exception as e:
                logger.exception(e)
        logger.debug("Next cache moved")