HPCC-11063 Change based on review comments

Check access before calling addArchivedWU()
Fix apossible leak in old code

Signed-off-by: Kevin Wang kevin.wang@lexisnexis.com