Api updates for ui

* improved handling for errors and handle cleanup in log parser
* add some fields for ui apis for jobs
* return traceback on apis only if debug is true