Reviesed error handling to output traceback in log