Improving logging for rescanExisting and fixing JUnit tests.