//write c:\ModStats\ $+ $asctime(mmm) $+ \FailedAttempts.txt worked fine for me.
I'm guessing your problem is that you are trying to get mIRC to create a folder with the /write command. mIRC can't do that, so you must have a folder called (in this case) Oct in C:\modstats\ else it will throw up an error.