Exclude a book cover from Kobo's screensaver

For books without real or with a bad cover, or books you don't want others to see that you are reading them.

No global variables were created with this CR! ;-)
I still don't get it...
I tried this:
        local lastfile = G_reader_settings:readSetting("lastfile")
        local historyfile = DocSettings:getHistoryPath(lastfile)
At this point I could easily use variable=pcall(dofile,historyfile) and then read variable["exclude_screensaver"]. But like suggested I tried to use DocSettings:open:
        local data = DocSettings:open(historyfile)
        local excl = data:readSetting("exclude_screensaver")
But data is always an empty table, so excl is nil.
Where is my error here?

(Not sure if I want to keep all these local variables at the end, but of course it is way easier to read this way instead of putting the whole thing into one line)

I am not sure what ack and ag are, i guess these are linux commands?