def update_bucket_size(f):
    """Decorate to update bucket size after operation."""
    @wraps(f)
    def inner(self, *args, **kwargs):
        res = f(self, *args, **kwargs)
        self.bucket.size += self.file.size
        return res
    return inner