Go to file options and see what scirpt has been set to run when the file is closed.
Check that script for a script step with an error. There are several scripts steps that could trigger this error, but Save a copy as would seem the most likely script step to be causing this error.
Then you can either fix this step or remove it (or the entire script).
FileMaker automatically saves when it is closed so you would only need Save A Copy As to save an additiona back up copy to another location.
If you find that you need to fix this script rather than remove it, see this thread for a file you can download that can help you explore and understand file paths, container fields and $Path variables: Exploring the use of a $Path Variable in Scripts
Thank you that was EXACTLY the issue - an ancient backup script - now it is safely disabled and I can close the database in peace from now on. Thank you again!