Fix pkgid and add a convenience logger