Use a reliable timestamp.

smry.last could very well be empty. Just use the current time
instead to make things more reliable.
check for errors other than NotFound

It was previously ignoring all errors, which isn't so great,
so while debugging something else I added a proper check.