<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check(self, digest):
 """Check the integrity of the file with the given digest Args: digest -- digest of the file to check Returns: True if the file is not corrupted """

        path = self.get_file_path(digest)
        if self._calc_digest(path) != digest:
            self.logger.warning("found corrupted file: '{0}'".format(path))
            return False
        return True