private function updateFile()
    {
        if (is_null($this->file_path)) {
            throw new StorageException('Invalid file path');
        }

        file_put_contents(
            $this->file_path,
            serialize(
                [
                    'tokens' => $this->tokens,
                    'states' => $this->states
                ]
            )
        );
    }