log.ref
more correct tests
bugfix: ensure that handlers are called when calling GC before exit