public function putToJson($data)
    {
        $path = $this->getStoragePath();

        //check if the storage path is writable
        if (!is_writable($path)) {
            throw new \InvalidArgumentException('The storage_path option in your '.$this->getOption('name').' settings config is not writable');
        }

        file_put_contents($path.$this->getOption('name').'.json', json_encode($data));
    }