Fix up hardcoded NS ID reference in select statement and add commented out export option

It was breaking the timed log checks on anything that wasnt NS ID 4....

Also provide commented out export option for people to activate if required / desired.