more verbose logging, better tests