Commiting some debug code I've been using to help identify a bug