Correct call to get db in register-run, added exit when race condition causes hostinfo to not be found