Output every 1000 scans rather than 100
Swapped parameters around
Updated portal repository database structure