An error...

I have a unix command within a unix backup script that activates an applescript that will erase a disk for me if I want. The syntax is below:
osascript -l AppleScript -e ‘tell Application “erase disk” to activate’

I receive an output error from terminal/Macaroni:
execution error: erase disk got an error: Reply has not arrived -( 1718)

The backup script works just fine other than this error. I’m wondering if there is something in my applescript that I can add that would take away this error.
My applescript is below:
with timeout of 300 seconds
try
tell me to activate
display dialog “Would you like to erase a disk?” buttons {“No”, “Yes”} default button 1 with icon note giving up after 5
if the button returned of the result is “Yes” then
do shell script “hdiutil burn -erase”
end if
end try
end timeout

Just a guess, but maybe it doesn’t know the name of the disk. hdiutil burn imagename -erase