fixed problem on loop/loop.php

Also added a plugin for debugging to use locally.