test data factory: fix increment, and add a debug message