report function added
added exception handling in the batch run
some minor fixes