Modify output format of verbose logging and add some tests.