You have a unnecessary semicolon in your code (after LastWriteTime). If you used VSCode it would have notified you about the error.
Regardless of that … Since you have more than one property you want to output I’d recommend to output the result of your query to a CSV file like this: