Improved logging when testing