Depends on how you intend to use logger.txt. Imagine if, down the road, you decide to display the contents of logger.txt in a web browser window, and someone put in some malicious javascript stuff. At first, it's totally inert, just sitting there in the file, but later on, it could cause issues that you don't foresee now. Or, if you decide to suck the contents into a database, and someone puts in SQL code that essentially is the same as SQL injection. Totally inert while it's in the file, but used otherwise, could be damaging. Just depends on how you intend to use it. Personally, I would sanitize it, but that's just me.