The problem can not be in the code because the script is not found at all. You attempt to start a "main.wdl" instead of "main.c". So you've given a wrong script name somewhere.
If you get that error in WED, its a wrong script name in the map properties. If in SED, the wrong script name is in the engine command line under Options.
You should also post the acklog.txt here, which contains the message about the reason of the problem.