Reorder, and add a debug message