Fixed unittest, removed double logging