XPP Rest return values and order of operations

In javascript running on a content server, I am using axios.get to run an XPP Rest "User command," which successfully executes a Perl script on the XPP server to copy a file from one folder to another on that server. I am separately signed into the XPP server, and can see that the file has been copied successfully. On the javascript side, I am receiving status code 200 (success), which I think means that XPP Rest found the Perl script and ran it. Unfortunately, code 200 does not mean that the file copied successfully on the XPP server, because the Perl script fails silently when I ask it to copy a nonexistent file. I am looking for a way please to provide a meaningful return value from the Perl script back to the javascript, to verify that the file copy took place and therefore that subsequent actions can proceed. Thank you!

emoji