The script will return a code:
0: the script was successful
1: the script failed; an error message has been written to the logfile
2: the script failed and was unable to write an error message to the logfile
3: the script was not called according to its signature (i.e. wrong number of parameters)