Moved debugging snippet to proper location