I’m attaching an updated patch, which fixes logging and a memory leak. -- Richard