Invalidaction script using if then else statement

Hi all,
This is the problematic action script, when I submit the fixlet with the action script, then prompt me error “Unable to parse action script line0: Endif encountered without if.” please help.

if {(exists file “c:\temp\abc.txt”)}
run cmd.exe /k “exists”
endif

I dont see issue with your current if & endif but if you can post the whole script, we might able to see if there is any extra endif.