Update status when processing done
Update infofile status after found files from waiting
Fixed some bugs in error reporting and db updating
Fixed bugs in main and actions
Update db with only results, dont overwrite.

This fixes a bug in which a process in the queue retrieves info
from DB, and processes files which takes some time. The update
afterwards used to overwrite a DB record, with outdated data from
other queues in there. Problem: other things in queued status
since the start of a slow process, which are actually already
done when the slower process ends, leading to datasets being
updated from 'done' to 'queued', and never finish since there
will not be another 'done' update.
Removed tmpraw variable since its no longer needed