Fixed broken test and improved logging