This function is called in commandline mode after calling all scripts specified in commanline parameters - unless some of the scripts exit the application prematurely, for example by calling exit().