Saving an OmniGraffle file using AppleScript

I have automated a drawing in OmniGraffle using AppleScript, and now I want to also save it with AppleScript, but I get the message I do not have permission to save it:

tell application “OmniGraffle”

set thetitle to “test”

set thepath to “/Users/Andrew/OmniGraffleAuto/” as string

set thedoc to document 1

save thedoc in “test”

close thedoc

end tell