Added peak memory usage logging. Added verboseLevel parameter instead of debug. Try to log exceptions in global exception handler.