@savefile@ works fine.
Here is the command I am using. The crash occurs when the command is entered in chat. The counter increments, but the file is not updated:
@savelog@[testfile.txt,test]
This file does exist in the \custom logs directory; it was created by @savefile@[testfile.txt,test]
Here are a few samples from the error log:
23 Aug 21:06:14,705 - 0.7.4.1: Crashed Index and length must refer to a location within the string.
Parameter name: length
23 Aug 21:06:14,708 - 0.7.4.1: Crashed at System.Runtime.CompilerServices.AsyncServices.<ThrowAsync>b__0(Object state)