Well I do see an extra space between = and $2.
You probably won't like my answer as it doesn't fix your issue, but the variable setting %file.txt is pointless. Why set a variable for something you need on the next line? Why not just:
.write %file.log $2 $3 whoised $me on $date at $time