It looks like jasonwryan explained your problem within one minute of posting.
I would guess the reason people voted it as unclear is that commenting something out in code appears purposeful -- you actually managed to cut and paste that in without noticing.
I wouldn't downvote this, but I would not compensate with an upvote either. The tooltip for the down arrow reads:
This question does not show any research effort; it is unclear or not useful.
If your mistake was simply a very obvious typo that you didn't understand in five lines of code, then perhaps it is unfair to consider you to have been acting hastily or thoughtlessly. I would give you the benefit of the doubt here, which is why I wouldn't downvote it.
However, that benefit of the doubt is a bit of a stretch, and I can understand someone looking at this and thinking, "You didn't even bother to proofread this, boo -- downvote." Which is why I wouldn't upvote it.
More than 80% of the questions I start to compose here never get posted because in the process of trying to make the question as clear as possible, etc., I recognize my mistake or realize the answer, and that it is of a nature that probably isn't useful in a general sense, or has already been asked and answered. Some of the S.E. mechanisms, such as downvoting and closing/holding questions, hopefully encourage people to think this way.
Note that your question currently does not have any answers and is not useful in a general sense. No one is likely to come around having made an identical typo and find this question. That being the case, it is perfectly fine if you delete the question, in which case you get your lost rep back!
In fact, it would probably be best if you do delete that since it is not generally useful. Perhaps the downvote was meant to encourage you to do so. Although I know not everyone shares my opinion here, self-deleting downvoted answers (and questions, when it is possible -- you can't if someone answers and gets an upvote) is a common practice and helps to keep the site clear of pointless nonsense. Not to say your post is quite nonsense, but it is close.
ping
output with a timestamp to a file whose name contains the date, and then your question isn't even about that. You ask why the loop doesn't work when the loop code is commented out. I'm surprised it didn't get more downvotes. – Scott Apr 11 '15 at 9:25