If all you are doing is trying to log the player then I would recommend doing it on client_putinserver().
I would start with Bugsy's example and just modify it to add your SteamID to the list and write to the file (as shown in the AddID() function). Don't do anything with names yet. Get it working then you can add or modify from there.
As far as your most recent code, you need to put quotes around the %L to get it to compile. Again, you need to start simple. Don't do any multilingual stuff until you have the rest of the code working as it should.