minor logging and performance improvements