Added some file checking (was pulling in index.html), and foreach loop checker (errors poping up)