<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def resize_file_to(self, in_path, out_path, keep_filename=False):
 """ Given a filename, resize and save the image per the specification into out_path :param in_path: path to image file to save. Must be supported by PIL :param out_path: path to the directory root for the outputted thumbnails to be stored :return: None """

        if keep_filename:
            filename = path.join(out_path, path.basename(in_path))
        else:
            filename = path.join(out_path, self.get_thumbnail_name(in_path))
        out_path = path.dirname(filename)
        if not path.exists(out_path):
            os.makedirs(out_path)
        if not path.exists(filename):
            try:
                image = Image.open(in_path)
                thumbnail = self.resize(image)
                thumbnail.save(filename)
                logger.info("Generated Thumbnail {0}".format(path.basename(filename)))
            except IOError:
                logger.info("Generating Thumbnail for {0} skipped".format(path.basename(filename)))