improve the ommitting of the last output file in case JOBISRUNNNING is set
Further improvement of the jobIsRunning mode; improved restart file handling