def METHOD_NAME(self, path, string):
    try:
        self.logger.info("writing \"%s\" to file %s" % (string, path))
        with open(path, "w") as f:
            f.write(string)
        return True
    except IOError as e:
        self.logger.warning("error while writing to file %s: %s" % (path, str(e)))
        return False